<!--
/*
 * SPDX-License-Identifier: GPL-3.0-or-later
 * Copyright 2014 The moOde audio player project / Tim Curtis
 *
 * 汉化：Androidnews
 *
*/
-->
<div id="container">
<div class="container">
	<h1 class="snd-config">音频</h1>

	<form class="form-horizontal" method="post">
		<legend>音频输出</legend>
		<p class="sub-legend">
			从Pi HDMI/耳机、I2S或USB音频设备中进行选择.
			当输出到蓝牙扬声器或多房间发送器或接收器打开时,无法更改这些设置.
		</p>

		<div class="control-group">
			<label class="control-label" for="output-device">输出设备</label>
			<div class="controls">
                <select id="output-device" name="output_device_cardnum" class="config-select-large" onchange="autoClick('#btn-set-output-device');" $_output_device_btn_disabled>
					$_mpd_select[device]
                </select>
				<button id="btn-set-output-device" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_output_device" value="novalue" $_output_device_btn_disabled><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="nop" value="novalue" $_output_device_btn_disabled>扫描</i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-output-device" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-output-device" class="config-help-info">
					The list shows the ALSA card number and assigned audio device or "empty".
					The SCAN button refreshes the list to pick up newly connected USB audio devices.
				</span>
			</div>

			<label class="control-label" for="mixer-type">音量类型</label>
            <div class="controls">
                <select id="mixer-type" name="mixer_type" class="config-select-large" onchange="autoClick('#btn-set-mixer-type');" $_volume_type_btn_disabled>
					$_mpd_select[mixer_type]
                </select>
				<button id="btn-set-mixer-type" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_volume_type" value="novalue" $_volume_type_btn_disabled><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-mixer-type" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-mixer-type" class="config-help-info">
					Volume type used by MPD.<br>
					<b>- Hardware:</b> Audio device on-chip volume controller.<br>
					<b>- Software:</b> MPD software volume (32 bit float with dither).<br>
					<b>- Fixed (0dB):</b> Output 100% volume. Assumes a downstream volume control is used.<br>
					<b>- CamillaDSP:</b> CamillaDSP software volume (64 bit float with dither).
				</span>
				<span class="config-help-static">
					在更改这些选项之前,请将音量设置为较低水平.
					$_software_and_dsd_warning
				</span>
			</div>

			<div class="$_camilladsp_volume_range_hide">
				<label class="control-label" for="camilladsp-volume-range">音量范围</label>
				<div class="controls">
					<select id="camilladsp-volume-range" class="config-select-large" name="camilladsp_volume_range" onchange="autoClick('#btn-set-camilladsp-volume-range');">
						$_select[camilladsp_volume_range]
					</select>
					<button id="btn-set-camilladsp-volume-range" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_camilladsp_volume_range" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
					<a aria-label="Help" class="config-info-toggle" data-cmd="info-camilladsp-volume-range" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
					<span id="info-camilladsp-volume-range" class="config-help-info">
						This value represents the difference between the maximum loudness and background noise level.
						It is used to generate the volume curve which determines the loudness at each point on the CamillaDSP volume slider and moOde volume knob.
					</span>
				</div>
			</div>

			<div class="config-horiz-rule"></div>

			<label class="control-label" for="i2sdevice">I2S设备名称</label>
			<div class="controls">
				<select id="i2sdevice" class="config-select-large" name="i2sdevice" onchange="autoClick('#btn-set-i2sdevice');" $_i2sdevice_btn_disable>
					$_i2s[i2sdevice]
				</select>
				<button id="btn-set-i2sdevice" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_i2s_device" value="novalue" $_i2sdevice_btn_disable><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
			</div>
			<label class="control-label" for="i2soverlay">or DT overlay</label>
			<div class="controls">
				<select id="i2soverlay" class="config-select-large" name="i2soverlay" onchange="autoClick('#btn-set-i2soverlay');" $_i2soverlay_btn_disable>
					$_i2s[i2soverlay]
				</select>
				<button id="btn-set-i2soverlay" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_i2s_overlay" value="novalue" $_i2soverlay_btn_disable><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<span class="config-help-static">
					设置设备或覆盖后,重新启动,然后从输出设备列表中选择设备.
				</span>
			</div>

			<label class="control-label" for="drvoptions">驱动选项</label>
			<div class="controls">
				<select id="drvoptions" class="config-select-large" name="drvoptions" onchange="autoClick('#btn-set-drvoptions');" $_driveropt_btn_disable>
					$_select[drvoptions]
				</select>
				<button id="btn-set-drvoptions" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_drvoptions" value="novalue" $_driveropt_btn_disable><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-drvoptions" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-drvoptions" class="config-help-info">
					<b>slave:</b> If enabled, Boss and MiniBOSS DAC operate in slave mode required by Kali reclocker.<br>
					<b>glb_mclk:</b> If enabled, Kali MCLK is used and PLL for Piano 2.1 is disabled for best SQ.<br>
                </span>
			</div>

			<label class="control-label">芯片选项</label>
			<div class="controls">
				<a href="chp-config.php" $_chip_link_disable><button class="btn btn-primary btn-medium config-btn" $_chip_btn_disable>编辑</button></a>
			</div>
		</div>

		<legend>ALSA选项</legend>
		<p class="sub-legend">
			高级Linux声音架构(ALSA)是一个软件框架,也是Linux内核的一部分,为声卡设备驱动程序和音频应用程序提供应用程序编程接口(API).
		</p>

		<div class="control-group">
			<label class="control-label" for="alsavolume-max">最大音量</label>
			<div class="controls">
				<input class="config-input-large" $_alsavolume_max_readonly type="number" maxlength="3" min="1" max="100" id="alsavolume-max" name="alsavolume_max" value="$_alsavolume_max" required $_alsavolume_max_disable>
				<button class="btn btn-primary btn-small config-btn-set btn-submit status-msg" type="submit" name="update_alsavolume_max" value="novalue" $_alsavolume_max_disable><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-alsavolume-max" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				$_alsavolume_max_pct
				<span id="info-alsavolume-max" class="config-help-info">
					This establishes the ALSA 0dB level when volume type is set to Software, Fixed or CamillaDSP, or when any Renderers are active.
					Alsamixer volume units (1 to 100) are used.
				</span>
			</div>

			<label class="control-label" for="alsa-output-mode">输出模式</label>
			<div class="controls">
				<select id="alsa-output-mode" class="config-select-large" name="alsa_output_mode" onchange="autoClick('#btn-set-alsa-output-mode');" $_alsa_output_mode_disable>
					$_select[alsa_output_mode]
				</select>
				<button id="btn-set-alsa-output-mode" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_alsa_output_mode" value="novalue" $_alsa_output_mode_disable><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-alsa-output-mode" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span class="config-help-static">
					ALSA: $_alsa_output_mode
				</span>
				<span id="info-alsa-output-mode" class="config-help-info">
					<b>Default: </b>ALSA "plughw" plugin which performs format conversions if needed to match audio device requirements.<br>
					<b>Direct: </b>ALSA "hw" plugin which does not perform format conversions. The audio device must accept the given format.<br>
					<b>IEC958: </b>ALSA "iec958" plugin which provides IEC958_SUBFRAME_LE format for HDMI audio.<br>
					These modes apply to MPD, Bluetooth (inbound), AirPlay, Spotify Connect, Squeezelite and the Equalizers.
				</span>
			</div>

			<label class="control-label">环回</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-alsa-loopback" for="toggle-alsa-loopback-2">开</label>$_select[alsa_loopback_on]
					<label class="toggle-radio toggle-alsa-loopback" for="toggle-alsa-loopback-1">关</label>$_select[alsa_loopback_off]
				</div>
				<button id="btn-set-alsa-loopback" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_alsa_loopback" value="novalue" $_alsa_loopback_disable><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-alsa-loopback" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-alsa-loopback" class="config-help-info">
					The Loopback device provides a copy of the PCM output stream that can be accessed by reading "hw:Loopback,1,0".<br>
					<b>-</b> Loopback is not supported for CamillaDSP.<br>
					<b>-</b> Loopback requires > 44.1K for Pi-3 HDMI/Headphone (does not apply if Multiroom Sender is on).
                </span>
			</div>

			<div $_feat_multiroom">
				<label class="control-label">多房间</label>
				<div class="controls">
					<a href="trx-config.php"><button class="btn btn-primary btn-medium config-btn">配置</button></a>
					<span class="config-help-static">
						设置多房间发送器和接收器。
		            </span>
				</div>
			</div>
		</div>

		<legend>MPD选项</legend>
		<p class="sub-legend">
			音乐播放器守护程序(MPD)是一个灵活、强大的用于播放音乐的服务器端应用程序,是moOde中的主要音频应用程序。MPD设置,包括DSD、SoX重采样、音频缓冲区和其他设置,通过''编辑''按钮进行配置.
		</p>

		<div class="config-horiz-rule">常规</div>
		<div class="control-group">
			<label class="control-label">MPD设置</label>
			<div class="controls">
				<a href="mpd-config.php"><button class="btn btn-primary btn-medium config-btn">编辑</button></a>
			</div>

			<div class="controls">
				<a data-toggle="modal" href="#mpd-restart"><button class="btn btn-medium btn-primary config-btn">重启</button></a>
				<span class="config-btn-after">MPD</span>
			</div>

			<label class="control-label">启动后自动播放</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-autoplay" for="toggle-autoplay-2">开</label>$_select[autoplay_on]
					<label class="toggle-radio toggle-autoplay" for="toggle-autoplay-1">关</label>$_select[autoplay_off]
				</div>
				<button id="btn-set-autoplay" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_autoplay" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-autoplay" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-autoplay" class="config-help-info">
					Start auto-shuffle random play if it was previously active or play last played item.
                </span>
			</div>

			<label class="control-label">元数据文件</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-extmeta" for="toggle-extmeta-2">开</label>$_select[extmeta_on]
					<label class="toggle-radio toggle-extmeta" for="toggle-extmeta-1">关</label>$_select[extmeta_off]
				</div>
				<button id="btn-set-extmeta" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_extmeta" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-extmeta" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-extmeta" class="config-help-info">
					Maintain enhanced metadata for the currently playing song or station in the /var/local/www/currentsong.txt file. This file is updated within three seconds after any metadata updates on the UI.
                </span>
			</div>
		</div>

		<div class="config-horiz-rule">自动乱序</div>
		<div class="control-group">
			<label class="control-label">自动乱序</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-ashufflesvc" for="toggle-ashufflesvc-2">开</label>$_select[ashufflesvc_on]
					<label class="toggle-radio toggle-ashufflesvc" for="toggle-ashufflesvc-1">关</label>$_select[ashufflesvc_off]
				</div>
				<button id="btn-set-ashufflesvc" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_ashufflesvc" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-ashufflesvc" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-ashufflesvc" class="config-help-info">
					When the last song in the Playlist has finished playing, Auto-shuffle adds two randomly selected songs from the music library
					to the end of the Playlist then repeats the process. This creates a continuous stream of music without growing the Playlist and
					having two tracks enables MPD Crossfade to be used. NOTE: Auto-shuffle replaces MPD random play as the method for the 'Random' button.
                </span>
			</div>

			<label class="control-label" for="ashuffle-mode">模式</label>
			<div class="controls">
				<select id="ashuffle-mode" class="config-select-large" name="ashuffle_mode" onchange="autoClick('#btn-set-ashuffle-mode');">
					$_select[ashuffle_mode]
				</select>
				<button id="btn-set-ashuffle-mode" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_ashuffle_mode" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info_ashuffle_mode" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info_ashuffle_mode" class="config-help-info">
					Play randomly selected track or whole album.
				</span>
			</div>

			<label class="control-label" for="ashuffle-window">视窗大小</label>
			<div class="controls">
                <input class="config-input-large" type="number" maxlength="3" min="1" max="1024" id="ashuffle-window" name="ashuffle_window" value="$_ashuffle_window" required>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_ashuffle_window" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-ashuffle-window" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-ashuffle-window" class="config-help-info">
					Sets the size of the "window" used for the shuffle algorithm.
					Lower numbers mean more frequent repeats, and higher numbers mean less frequent repeats.
					The default window size is 7.
                </span>
			</div>

			<label class="control-label" for="ashuffle-filter">标记过滤</label>
			<div class="controls">
                <input class="config-input-large" type="text" id="ashuffle-filter" name="ashuffle_filter" value="$_ashuffle_filter">
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_ashuffle_filter" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info_ashuffle_filter" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info_ashuffle_filter" class="config-help-info">
					String of TAG VALUE pairs that Auto-shuffle uses to select the tracks being shuffled.
					Only one occurrence of a given TAG is allowed. The filter is case insensitive and it performs a TAG contains VALUE substring match.<br>
					<b>Ex:</b> genre "indie rock" artist coldplay<br>
					<b>Ex:</b> filename "NAS/Music/Led Zeppelin"
                </span>
			</div>
		</div>

		<div class="config-horiz-rule">音量选项</div>
		<div class="control-group">
			<label class="control-label" for="volume-step-limit">音量步进限制</label>
			<div class="controls">
				<select id="volume-step-limit" class="config-select-large" name="volume_step_limit" onchange="autoClick('#btn-set-volume-step-limit');">
					$_select[volume_step_limit]
				</select>
				<button id="btn-set-volume-step-limit" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_volume_step_limit" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info_volume_step_limit" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info_volume_step_limit" class="config-help-info">
					Sets the maximum amount the volume knob will advance when it's clicked ahead of its current position.
				</span>
			</div>

			<label class="control-label" for="volume-mpd-max">最大MPD音量</label>
			<div class="controls">
                <input class="config-input-large" type="number" maxlength="3" min="1" max="100" id="volume-mpd-max" name="volume_mpd_max" value="$_volume_mpd_max" required>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_volume_mpd_max" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info_volume_mpd_max" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info_volume_mpd_max" class="config-help-info">
					Establishes the highest Volume Knob level that can be set.
                </span>
			</div>

			<label class="control-label">显示dB音量</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-volume-db-display" for="toggle-volume-db-display-2">开</label>$_select[volume_db_display_on]
					<label class="toggle-radio toggle-volume-db-display" for="toggle-volume-db-display-1">关</label>$_select[volume_db_display_off]
				</div>
				<button id="btn-set-volume-db-display" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_volume_db_display" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info_volume_db_display" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info_volume_db_display" class="config-help-info">
					Display dB volume next to the 0-100 level in the volume knob.
                </span>
			</div>

			<label class="control-label">USB音量旋钮</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-usb-volknob" for="toggle-usb-volknob-2">开</label>$_select[usb_volknob_on]
					<label class="toggle-radio toggle-usb-volknob" for="toggle-usb-volknob-1">关</label>$_select[usb_volknob_off]
				</div>
				<button id="btn-set-usb-volknob" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_usb_volknob" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info_usb_volknob" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info_usb_volknob" class="config-help-info">
					Activates the triggerhappy key mapping daemon for USB volume knobs.<br>
					Refer to /etc/triggerhappy/triggers.d/media.conf for key/event mappings.
                </span>
			</div>

			<label class="control-label">旋转编码器</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-rotaryenc" for="toggle-rotaryenc-2">开</label>$_select[rotaryenc_on]
					<label class="toggle-radio toggle-rotaryenc" for="toggle-rotaryenc-1">关</label>$_select[rotaryenc_off]
				</div>
				<button id="btn-set-rotaryenc" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_rotenc" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-rotaryenc" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-rotaryenc" class="config-help-info">
					Enable a rotary encoder device to control MPD volume.
                </span>
			</div>

			<label class="control-label" for="rotenc-params">Encoder设置</label>
			<div class="controls">
				<input class="config-input-large" type="text" id="rotenc-params" name="rotenc_params" value="$_select[rotenc_params]" required>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_rotenc_params" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-rotaryenc-params" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-rotaryenc-params" class="config-help-info">
					Encoder settings (positional)<br>
					- <b>Poll interval:</b> Number of ms sleep for the volume update polling loop. Default = 100.<br>
					- <b>Speed factor:</b> Threshold (diff betw last/current enc pos) to determine whether to use 1 step or volume_step steps. Default = 2.<br>
					- <b>Volume_step:</b> Number of steps to use when knob turns at fast rate. Default = 3.<br>
					- <b>Pin_A Pin_B:</b> Broadcom SoC pin numbers. Default = 23 24.
                </span>
			</div>
		</div>

		<div class="config-horiz-rule">DSP选项</div>
		<p class="sub-legend">
			请注意,均衡器,交叉馈送和极性反转是互斥的.启用其中一个会禁用其他.
		</p>

		<div class="control-group">
			<label class="control-label" for="mpdcrossfade">交叉衰减(秒)</label>
			<div class="controls">
                <input class="config-input-large" type="number" maxlength="2" min="0" max="15" id="mpdcrossfade" name="mpdcrossfade" value="$_mpdcrossfade" required>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_mpdcrossfade" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-mpdcrossfade" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-mpdcrossfade" class="config-help-info">
					The MPD Audio buffer must be large enough to perform the requested number of seconds of crossfade for a given audio format. Set to 0 to disable crossfade.
                </span>
			</div>

			<label class="control-label" for="crossfeed">交叉馈送</label>
			<div class="controls">
				<select id="crossfeed" class="config-select-large" name="crossfeed" onchange="autoClick('#btn-set-crossfeed');" $_crossfeed_ctl_disabled>
					$_select[crossfeed]
				</select>
				<button id="btn-set-crossfeed'" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_crossfeed" value="novalue" $_crossfeed_ctl_disabled><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-crossfeed" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-crossfeed" class="config-help-info">
					<b>700 Hz, 3.0 dB - Linkwitz</b><br>
					- Approximates an original Linkwitz crossfeeder with azimuth 40 degrees. Highest crossfeed level, lowest separation.<br>
					<b>700 Hz, 4.5 dB - Bauer</b><br>
					- Approximates a virtual speaker placement with azimuth 30 degrees at about 3 meters distance.<br>
					<b>800 Hz, 6.0 dB - Chu Moy</b><br>
					- Approximates a Chu Moy modified Linkwitz crossfeeder.<br>
					<b>650 Hz, 10.0 dB - Jan Meier</b><br>
					- Approximates a Jan Meier natural crossfeeder. Lowest crossfeed level, highest separation.<br>
                </span>
			</div>

			<label class="control-label">极性反转</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-invert-polarity" for="toggle-invert-polarity-2">开</label>$_select[invert_polarity_on]
					<label class="toggle-radio toggle-invert-polarity" for="toggle-invert-polarity-1">关</label>$_select[invert_polarity_off]
				</div>
				<button id="btn-set-invert-polarity" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_invert_polarity" value="novalue" $_invpolarity_ctl_disabled><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info_invert_polarity" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info_invert_polarity" class="config-help-info">
					Change the waveform on each channel from +/- to -/+.<br>
                </span>
			</div>
		</div>

		<div class="config-horiz-rule">HTTP流</div>
		<div class="control-group">
			<label class="control-label">流服务器</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-mpd-httpd" for="toggle-mpd-httpd-2">开</label>$_select[mpd_httpd_on]
					<label class="toggle-radio toggle-mpd-httpd" for="toggle-mpd-httpd-1">关</label>$_select[mpd_httpd_off]
				</div>
				<button id="btn-set-mpd-httpd" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_mpd_httpd" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-mpd-httpd" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-mpd-httpd" class="config-help-info">
					Provide MPD output as an HTTP stream on the designated port.<br>
                </span>
			</div>

			<label class="control-label" for="mpd-httpd-port">端口</label>
			<div class="controls">
                <input class="config-input-large" type="number" maxlength="4" min="8000" max="9000" id="mpd-httpd-port" name="mpd_httpd_port" value="$_mpd_httpd_port" required>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_mpd-httpd_port" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-mpd-httpd-port" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-mpd-httpd-port" class="config-help-info">
					Default port is 8000. Port number range is 8000 - 9000.
                </span>
			</div>

			<label class="control-label" for="mpd-httpd-encoder">编码</label>
			<div class="controls">
				<select id="mpd-httpd-encoder" class="config-select-large" name="mpd_httpd_encoder" onchange="autoClick('#btn-set-mpd-httpd-encoder');">
					$_select[mpd_httpd_encoder]
				</select>
				<button id="btn-set-mpd-httpd-encoder" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_mpd_httpd_encoder" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-mpd-httpd-encoder" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-mpd-httpd-encoder" class="config-help-info">
					Encode the stream using either FLAC at compression level 0 (fastest, least compression) or LAME (MP3) at 320 kbps.
				</span>
			</div>
		</div>

		<legend>均衡器</legend>
		<p class="sub-legend">
			均衡器由MPD、AirPlay、Spotify和蓝牙入站渲染器支持.如果蓝牙音频输出设置为“蓝牙扬声器”或多房间发送器或接收器打开,则它们不可用。
			请注意，均衡器、交叉馈送和极性反转是互斥的.启用其中一个会禁用其他.
		</p>

		<div class="control-group">
			<label class="control-label" for="cdsp-mode">CamillaDSP</label>
			<div class="controls">
				<select id="cdsp-mode" class="config-select-large" name="cdsp_mode" onchange="autoClick('#btn-set-cdsp-mode');" $_cdsp_mode_ctl_disabled>
					$_select[cdsp_mode]
				</select>
				<button id="btn-set-cdsp-mode" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_cdsp_mode" value="novalue" $_cdsp_mode_ctl_disabled><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-cdsp-mode" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="cdsp-config-description" class="config-help-static">
					$_config_description<br>
					$_config_check
				</span>
				<span id="info-cdsp-mode" class="config-help-info">
					CamillaDSP is a general purpose Digital Signal Processing engine for routing and filtering sound. It can be used for building crossovers for active speakers, performing room correction, equalization or volume control. CamillaDSP is maintained by Henrik Enquist. Integration into moOde was done by @bitlab.<br>
					Feature summary:<br>
					- IIR filters (BiQuad)<br>
					- FIR filters (Convolution via FFT)<br>
					- Built-in sample rate converter<br>
					- Filters can be chained freely<br>
					- Flexible routing<br>
					- Simple YAML configuration<br>
					- All calculations done with 64-bit floats<br>
					- ARM Neon 64-bit instruction set is used<br>
					- Pipeline editor with expert mode<br>
					Configurations can be managed at the CamillaDSP settings page.
                </span>
			</div>

			<div class="controls">
				<a href="cdsp-config.php"><button class="btn btn-medium btn-primary config-btn" $_cdsp_mode_ctl_disabled>编辑</button></a>
				<span class="config-btn-after">CamillaDSP设置</span>
			</div>

			<label class="control-label" for="eqfa12p">参数EQ</label>
			<div class="controls">
				<select id="eqfa12p" class="config-select-large" name="eqfa12p" onchange="autoClick('#btn-set-eqfa12p');" $_eqfa12p_ctl_disabled>
					$_select[eqfa12p]
				</select>
				<button id="btn-set-eqfa12p" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_eqfa12p" value="novalue" $_eqfa12p_ctl_disabled><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-eqp" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-eqp" class="config-help-info">
					Three x Four Mitra-Regalia peaking equaliser filters in series; a vector arithmetic re-implementation of Fons Adriaensens "Parametric1" equaliser[fafil] with minor differences. Parallelisation of the serial filter organisation causes the output to lag by three samples. This EQ uses the @bitlab custom eqfa12p component of the CAPS suite of DSP programs written by Tim Goetze<br>
					<b>NOTE:</b> Equalizer processing applies to MPD, AirPlay and Spotify output.<br>
                </span>
			</div>

			<div class="controls">
				<a href="eqp-config.php"><button class="btn btn-medium btn-primary config-btn">编辑</button></a>
				<span class="config-btn-after">EQ曲线</span>
			</div>

			<label class="control-label" for="alsaequal">图形EQ</label>
			<div class="controls">
				<select id="alsaequal" class="config-select-large" name="alsaequal" onchange="autoClick('#btn-set-alsaequal');" $_alsaequal_ctl_disabled>
					$_select[alsaequal]
				</select>
				<button id="btn-set-alsaequal" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_alsaequal" value="novalue" $_alsaequal_ctl_disabled><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-alsaequal" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-alsaequal" class="config-help-info">
					A classic octave-band, constant-Q, second-order filter design. Frequency bands centered above Nyquist are automatically disabled. This EQ uses the Eq10X2 component of the CAPS suite of DSP programs written by Tim Goetze.<br>
					<b>NOTE:</b> Equalizer processing applies to MPD, AirPlay and Spotify output.<br>
                </span>
			</div>

			<div class="controls">
				<a href="eqg-config.php"><button class="btn btn-medium btn-primary config-btn">编辑</button></a>
				<span class="config-btn-after">EQ曲线</span>
			</div>
		</div>
	</form>
</div>
</div>

<form class="form-horizontal" method="post">
	<div id="mpd-restart" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="mpd-restart-label" aria-hidden="true">
		<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h3>重启MPD服务?</h3>
		</div>
		<div class="modal-body"></div>
		<div class="modal-footer">
			<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
			<button class="btn btn-primary btn-submit" type="submit" name="mpdrestart" value="1">确认</button>
		</div>
	</div>
</form>
